#!/bin/sh
# switch power state using dmenu

options='lock
poweroff
reboot
suspend
'

sel=$(printf '%s' "${options}" \
	| dmenu -f -i -l 4 \
)

case "${sel}" in
	poweroff|reboot)
		sudo "${sel}"
		;;
	lock|suspend)
		"${sel}"
		;;
esac
